package org.jjj.market.mapper;

import org.apache.ibatis.annotations.Param;
import org.jjj.market.domain.ClueActivity;
import org.jjj.org.basic.mapper.IBaseMapper;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jiangjianjun
 * @since 2022-10-24
 */
public interface ClueActivityMapper extends IBaseMapper<ClueActivity> {
    /**
     * 当前端选择了线索关联活动时
     * 要给中间表保存进数据，这里用了批量新增
     */
    void batchActivities(@Param("clueId")Long clueId, @Param("activityIds")List<Long> activityIds);
    /**
     * 当存入关联数据时应该先清空一下线索对应id之前已经关联的活动，避免重复
     */
    void deleteByClueId(Long clueId);
}
